package com.fire.chat.annotation;

import com.fire.chat.config.AuthorityBeanRegister;
import com.fire.chat.enums.CacheStrategyEnum;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * @program: hxzq
 * @description: 开启角色鉴权服务
 * @author: xjr
 * @create: 2020-11-05 17:03
 **/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(AuthorityBeanRegister.class)
public @interface EnableAuthority {
    /**
     * 缓存策略
     */
    CacheStrategyEnum cacheStrategy() default CacheStrategyEnum.DISTRIBUTED;

    /**
     *是否开启鉴权服务,默认开启
     */
    boolean active() default true;
}
